package com.example.zhu.Mapper;

import com.example.zhu.dto.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserMapper {
    @Select("select * from user where username=#{username} and password=#{password}")
    User SelectUserByUP(User user);
    @Select("select * from user where id=#{id}")
    User selectByid(String id);
    @Update("update user set password=#{password},username=#{username} where id=#{id}")
    void update(User user);
    @Insert("insert into user (username,password) VALUES (#{username},#{password})")
    void insert(User user);
}
